package com.xiuyi.pixsynergybackend.service.picture;

import com.baomidou.mybatisplus.core.conditions.query.QueryWrapper;
import com.baomidou.mybatisplus.extension.plugins.pagination.Page;
import com.xiuyi.pixsynergybackend.controller.picture.vo.PictureQueryReqVO;
import com.xiuyi.pixsynergybackend.controller.picture.vo.PictureUploadReqVO;
import com.xiuyi.pixsynergybackend.controller.picture.vo.PictureVO;
import com.xiuyi.pixsynergybackend.controller.user.vo.UserQueryReqVO;
import com.xiuyi.pixsynergybackend.dal.dataobject.picture.PictureDO;
import com.baomidou.mybatisplus.extension.service.IService;
import com.xiuyi.pixsynergybackend.dal.dataobject.user.UserDO;
import org.springframework.web.multipart.MultipartFile;

import javax.servlet.http.HttpServletRequest;

/**
* @author zyt
* @description 针对表【picture(图片)】的数据库操作Service
* @createDate 2025-05-15 16:01:09
*/
public interface PictureService extends IService<PictureDO> {

    /**
     * 上传图片
     *
     * @param multipartFile
     * @param pictureUploadReqVO
     * @param loginUser
     * @return
     */
    PictureVO uploadPicture(MultipartFile multipartFile, PictureUploadReqVO pictureUploadReqVO, UserDO loginUser);

    /**
     * 获取查询条件
     *
     * @param pictureQueryReqVO
     * @return
     */
    QueryWrapper<PictureDO> getQueryWrapper(PictureQueryReqVO pictureQueryReqVO);

    /**
     * 获取单个图片
     *
     * @param pictureDO
     * @param request
     * @return
     */
    PictureVO getPictureVO(PictureDO pictureDO, HttpServletRequest request);


    /**
     * 分页获取图片
     *
     * @param pictureDOPage
     * @param request
     * @return
     */
    Page<PictureVO> getPictureVOPage(Page<PictureDO> pictureDOPage,HttpServletRequest request);


    /**
     * 校验图片数据
     *
     * @param pictureDO
     */
    void validPicture(PictureDO pictureDO);
}
